<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{baseui/head :: head}">
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="动检通智慧云平台"/>
    <meta name="author" content="牧中(上海)物联网科技有限公司"/>
    <link rel="shortcut icon" href="/webjars/images/favicon.png"/>

    <title>牧中畜牧业大数据智慧云平台V1.0</title>


</head>
<body>
<style>
    body {
        text-align: left;
    }

    .down_line {
        border-bottom: 1px solid #000000;
        width: 200px;
        color: #000000;
        font-family: "微软雅黑";
        font-size: 20px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_28_hei {
        color: #000000;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 28px;
        font-weight: bold;
        text-decoration: none;
    }

    .A_20_hei {
        color: #000000;
        font-family: "微软雅黑";
        font-size: 20px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_18_hei {
        color: #000000;
        font-family: "微软雅黑";
        font-size: 18px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_16_hei {
        color: #000000;
        font-family: "微软雅黑";
        font-size: 16px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_22_hei {
        color: #000000;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 22px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_20_red {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 20px;
        font-weight: bold;
        text-decoration: none;
    }

    .red {
        color: #B22222;
    }

    .black {
        color: #000000;
    }

    .A_12_hei {
        color: #000000;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: normal;
        text-decoration: none;
    }

    .webBeian_cont td {
        border: 1px solid #000;
        height: 25px;
        line-height: 25px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
    }

    .webBeian_cont .tdBg {
        font-size: 15px;
        text-align: center;
        color: #B22222;
        font-weight: bold;
        font-family: Arial, Helvetica, sans-serif;
    }

    .webBeian_cont {
        border: 0px;
    }

    .webBeian_cont .manyTd {
        white-space: normal;
        word-break: break-all;
    }

    .tb td {

        border: 0px;
    }

    .tb td:last-child {
        border: 0px;
    }
</style>
<!--顶部一级导航-->
<th:block th:replace="baseui/topheader :: topheader(1)"/>

<!--动检通菜单-->
<div id="topnav" th:replace="djt/partial/topnav :: topnav(7)"></div>


<div id="cl-wrapper">
    <!--左边导航-->
    <th:block th:replace="djt/partial/cert_left :: nav(2)"/>

    <div class="container-fluid" id="pcont">

        <table class="tb" style="width:660px;" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
            <tr>
                <td align="center" colspan="2" style="height:92px;text-align: center;" valign="middle">
                    <span class="A_28_hei">动物检疫合格证明</span><span class="A_20_red">（动物A）</span>
                </td>
            </tr>
            <tr>

                <td class="tdBg"></td>
                <td width="60%" class="A_20_hei" style="text-align:right;height:40px;">
                    <label>编号：</label> <span class="A_20_red">№.<span
                        th:text="${formDto.breedReport.number}">3378623498</span></span>
                </td>
            </tr>
            </tbody>
        </table>
        <table class="webBeian_cont" style="width:800px;" align="center">
            <tbody>
            <tr>
                <td class="tdBg" width="10%"><label>货主：</label></td>
                <td width="35.5%" colspan="2" th:text="${formDto.breedReport.userName}">

                </td>
                <td class="tdBg" width="10%"><label>联系电话：</label></td>
                <td width="35.5%" colspan="2" th:text="${formDto.breedReport.userMobile}">
                    13643773851
                </td>
                <td rowspan="13" style="border:0;border-left:1px solid #000;">
                    第<br><br>一<br><br>联<br><br><br><br><br><br><br><br><br><br><br>
                    共<br><br>两<br><br>联
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>动物名称：</label></td>
                <td width="35.5%" colspan="2" th:switch="${formDto.breedReport.breedType}">
                    <span th:case="1">猪</span>
                    <span th:case="2">牛</span>
                    <span th:case="3">羊</span>
                    <span th:case="4">家禽</span>
                </td>
                <td class="tdBg" width="10%"><label>数量及单位：</label></td>
                <td width="35.5%" colspan="2" th:switch="${formDto.breedReport.unit}">
                    <!--1头 2只 3羽 4克 5 毫升 6 头份 7kg-->
                    <span th:case="1" th:text="${formDto.breedReport.quantity}+'头'"></span>
                    <span th:case="2" th:text="${formDto.breedReport.quantity}+'只'"></span>
                    <span th:case="3" th:text="${formDto.breedReport.quantity}+'羽'"></span>
                    <span th:case="4" th:text="${formDto.breedReport.quantity}+'克'"></span>
                    <span th:case="5" th:text="${formDto.breedReport.quantity}+'毫升'"></span>
                    <span th:case="6" th:text="${formDto.breedReport.quantity}+'头份'"></span>
                    <span th:case="7" th:text="${formDto.breedReport.quantity}+'kg'"></span>
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>启运地点：</label></td>
                <td width="85%" colspan="5" th:text="${formDto.startAddress}">
                    浙江省 湖州市 吴兴区 八里店镇 &nbsp;八里店镇八里店镇路村村
                    &nbsp;(养殖场、交易市场)
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>到达地点：</label></td>
                <td width="75%" colspan="5" th:text="${formDto.receiveAddress}">
                    河南省 焦作市 博爱县 &nbsp;海南腾海食品有限公司
                    &nbsp;(养殖场、屠宰场、交易市场、村、养殖小区、其他)
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>用途：</label></td>
                <td width="25%" th:switch="${formDto.breedReport.purposeType}">
                    <!--0:其他;1:饲养;2:屠宰;3:展览;4:演出;5:比赛-->
                    <span th:case="60">其他</span>
                    <span th:case="10">饲养</span>
                    <span th:case="20">屠宰</span>
                    <span th:case="30">展览</span>
                    <span th:case="40">演出</span>
                    <span th:case="50">比赛</span>
                </td>
                <td class="tdBg" width="10%"><label>承运人：</label></td>
                <td width="25%" th:text="${formDto.breedReport.owner}">
                    张国贞
                </td>
                <td class="tdBg" width="10%"><label>联系电话：</label></td>
                <td width="25%" th:text="${formDto.breedReport.ownerMobile}">
                    13673421237
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>运载方式：</label></td>
                <td width="35.5%" colspan="3">
                    <input type="radio" name="ysfs" value="1" id="tp1" disabled="disabled">公路
                    <input type="radio" name="ysfs" value="2" id="tp2" disabled="disabled">水路
                    <input type="radio" name="ysfs" value="3" id="tp3" disabled="disabled">铁路
                    <input type="radio" name="ysfs" value="6" id="tp6" disabled="disabled">航空
                   <!-- <input type="radio" name="ysfs" value="4" id="tp4" disabled="disabled">机动三轮车-->
                    <input type="radio" name="ysfs" value="5" id="tp5" disabled="disabled">其它
                </td>
                <td class="tdBg" width="10%"><label>运载工具牌号：</label></td>
                <td width="35.5%" th:text="${formDto.breedReport.transportNumber}">
                    豫P41267
                </td>
            </tr>

            <tr>
                <td class="tdBg" width="10%" colspan="2"><label>运载工具消毒情况：</label></td>
                <td width="50%" colspan="4">
                    <span class="tdBg">装运前经</span> <span th:text="${formDto.breedReport.disinfection}">百毒杀</span><span
                        class="tdBg"> 消毒</span>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="border-right:0;border-bottom:0;"><font class="tdBg">本批动物经检疫合格，应于</font>
                    <span id="date">壹</span><font class="tdBg">日内到达有效。</font>

                </td>
                <td width="35.5%" colspan="3" style="border:0;border-top:1px solid #000;">&nbsp;</td>
            </tr>
            <input hidden="hidden" id="date1" th:value="${formDto.breedReport.deliverAt}"/>
            <input hidden="hidden" id="date2" th:value="${formDto.breedReport.receiveAt}"/>

           <tr>
                <td width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                <td width="50%" colspan="3" style="border:0;text-align:left;">
                    <font class="tdBg">官方兽医签字：</font>
                    <span th:text="${formDto.breedReportSurveyRecord==null?'':formDto.breedReportSurveyRecord.vetUserName}">谈文杰</span></td>
            </tr>
            <tr>
                 <td class="tdBg" width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                 <td width="50%" colspan="3" style=";border:0;text-align:left;">
                     <font class="tdBg">签发日期：</font> <span
                         id="starttime" >2017-07-25 18:10</span></td>
             </tr>
            <tr>
                <td class="tdBg" width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                <td class="tdBg" width="50%" colspan="3" style="border:0;text-align:left;">
                    （动物卫生监督所检疫专用章）
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%">牲畜耳标号</td>
                <td colspan="5" style="height:40px;" class="manyTd">
                    <span th:each=" number,state:${formDto.breedReport.earTagNumbers}">
                        <span th:text="${number}"></span>
                    </span>
                </td>

            </tr>
            <tr>
                <td class="tdBg" width="10%"> 动物卫生监督检查站签章</td>
                <td class="tdBg" colspan="5" style="height:40px"></td>
            </tr>
            <tr>
                <td class="tdBg" width="10%">备注</td>
                <td colspan="5" class="manyTd">
                </td>
            </tr>
            </tbody>
        </table>
        <table class="tb" border="0" style="width:800px;" align="center">
            <tbody>
            <tr>
                <td class="A_10_hei">
                    注：1.本书一式两联，第一联随货同行，第二联由动物卫生监督所留存。<br><br>
                    2.跨省调运动物到达目的地后，货主或承运人应在24小时内向输入地动物卫生监督机构报告。<br><br>
                    3.牲畜耳标号只需填写后3位，可另附纸填写，需注明本检疫证明编号，同时加盖动物卫生监督机构检疫专用章。<br><br>
                    4.动物卫生监督所联系电话：0572-2289731
                </td>
            </tr>
            </tbody>
        </table>
        <div align="center" class="A_10_hei">

        </div>
        <div class="Noprint" align="center">
            <button type="button" class="btn btn-primary" onclick="history.back()">返回</button>
        </div>
<input hidden="hidden" id="id" th:value="${formDto.breedReport.id}" >
    </div>
</div>

<script type="text/javascript" src="/webjars/js/jquery.js"></script>


<script type="text/javascript" src="/webjars/js/jquery.nanoscroller/jquery.nanoscroller.js"></script>
<script type="text/javascript" src="/webjars/js/behaviour/general.js"></script>
<script src="/webjars/js/jquery.ui/jquery-ui.js" type="text/javascript"></script>

<script type="text/javascript" src="/webjars/js/jquery.nestable/jquery.nestable.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.switch/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="//cdn.bootcss.com/select2/3.4.5/select2.min.js" type="text/javascript"></script>

<script src="/webjars/js/bootstrap.slider/js/bootstrap-slider.js" type="text/javascript"></script>
<script type="text/javascript" src="/webjars/js/jquery.niftymodals/js/jquery.modalEffects.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.summernote/dist/summernote.min.js"></script>

<script type="text/javascript" src="/webjars/js/jquery.magnific-popup/dist/jquery.magnific-popup.min.js"></script>


<script src="/webjars/js/behaviour/voice-commands.js"></script>
<script src="/webjars/js/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/ecmascript" src="/webjars/jqgrid/js/i18n/grid.locale-cn.js"></script>
<script type="text/ecmascript" src="/webjars/jqgrid/js/jquery.jqGrid.min.js"></script>
<script src="//cdn.bootcss.com/echarts/3.6.2/echarts.min.js"></script>


<script type="text/javascript">
    $(document).ready(function () {

        App.init();
        $.ajax({
            type: "GET",
            url: "/djt/cert/animalajax?id="+$("#id").val(),
            dataType: "json",
            success: function (data) {
                showtransportation(data.report.transportation);
                showtime(data.report.receiveAt,data.report.deliverAt);
                ShowDate(data.report.deliverAt);
            }
        })
    });


        function showtransportation(transportation) {

            switch (Number(transportation)) {
                case 1 :
                    $("#tp1").attr("checked", "checked");
                    break;
                case 2 :
                    $("#tp2").attr("checked", "checked");
                    break;
                case 3 :
                    $("#tp3").attr("checked", "checked");
                    break;
                case 4 :
                    $("#tp4").attr("checked", "checked");
                    break;
                case 5 :
                    $("#tp5").attr("checked", "checked");
                    break;
                case 6 :
                    $("#tp6").attr("checked", "checked");
                    break;
            }
        }

        function showtime(time1,time2) {
            var date1 = new Date(time1);
            var date2 = new Date(time2);
            var time = date1.getTime() - date2.getTime();
            time = time / (1000 * 3600 * 24);
            switch (parseInt(time)+1) {
                case 1 :
                    $("#date").text("壹");
                    break;
                case 2 :
                    $("#date").text("贰");
                    break;
                case 3 :
                    $("#date").text("叁");
                    break;
                case 4 :
                    $("#date").text("肆");
                    break;
                case 5 :
                    $("#date").text("伍");
                    break;
                case 6 :
                    $("#date").text("陸");
                    break;
                case 7 :
                    $("#date").text("柒");
                    break;
                case 8 :
                    $("#date").text("捌");
                    break;
                case 9 :
                    $("#date").text("玖");
                    break;
            }
        }
    function ShowDate(date) {
        if (date != null && date != "") {
            var timestamp4 = new Date(date);
            var dt = timestamp4.toLocaleDateString().replace(/\//g, "-") + " " + timestamp4.toTimeString().substr(0, 8);
            $("#starttime").text(dt);
        } else {
            $("#starttime").text();
        }
    }


</script>

</body>
</html>
